//
//  DSFileManager.m
//  Note
//
//  Created by DongSen on 2018/9/12.
//  Copyright © 2018年 董森森. All rights reserved.
//

#import "DSFileManager.h"

@interface DSFileManager()


@end

@implementation DSFileManager

static DSFileManager * _manager;

+ (DSFileManager *) shareManager{
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        _manager = [[super allocWithZone:NULL] init];
    });
    return _manager;
}

+ (instancetype)allocWithZone:(struct _NSZone *)zone
{
    return  [self shareManager];
}
- (id) copyWithZone:(struct _NSZone *)zone
{
    return [DSFileManager  shareManager];
}

#pragma mark --
- (NSFileManager *)fileManager{
    if (!_fileManager) {
        _fileManager = [NSFileManager defaultManager];
    }
    return _fileManager;
}
- (NSUbiquitousKeyValueStore *)keyStore{
    if (!_keyStore) {
        _keyStore = [NSUbiquitousKeyValueStore defaultStore];
    }
    return _keyStore;
}


@end
